<?php
/**
 *	KLF Framework
 *
 *	Written by Kristian Oye <kristianoye@gmail.com> on Dec 20, 2011
 *	Copyright (C) 2010-2011
 */
namespace KLF\System\Web\MVC	
{
	use KLF\System\KObject;
	use KLF\System\Web\KHttpContext;
	use KLF\System\Web\Routing\KRouteData;
	use KLF\System\Collections\KDictionary;
	use KLF\System\Web\Routing\KRouteContext;
		
	/**
	 *  Class KViewContext
	 *
	 *  Context to assist in rendering views.
	 *
	 *  @package KLF\System\Web\MVC
	 *  @access public
	 *  @author Kristian Oye <kristianoye@gmail.com>
	 *  @since 0.1
	 *
	 *  @method KViewContext NewInstance
	 *  
	 *  @property KController $Controller
	 *  @property string $ControllerName
	 *  @property KHttpContext $HttpContext
	 *  @property KRouteContext $RouteContext
	 *  @property KRouteData $RouteData
	 *  @property KDictioanry $TempData
	 *  @property IView $View
	 *  @property KDictionary $ViewData
	 */
	class KViewContext extends KControllerContext
	{
		/**
		 * The name of the action being invoked.
		 * 
		 * @var string $_propActionName
		 */
		protected $_propActionName;
		
		/**
		 * The view to be rendered.
		 * 
		 * @var IView $_propView
		 */
		protected $_propView;

		/**
		 * View data used by the view.
		 * 
		 * @var KDictionary $_propViewData
		 */
		protected $_propViewData;
		
		/**
		 * Temporary data to be used by the view.
		 * 
		 * @var KDictionary $_propTempData
		 */
		protected $_propTempData;
		
		public function __construct(KControllerContext $context, IView $view, KDictionary $viewData, KDictionary $tempData)
		{
			parent::__construct($context->RouteContext);
			
			$this->_propView = $view;
			$this->_propViewData = $viewData;
			$this->_propTempData = $tempData;
			$this->_propControllerContext = $context;
		}
	}
}